package com.platform.module.common.base;

import com.platform.module.common.validator.PhoneConstraintValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * 手机号校验器注解
 */
@Constraint(validatedBy = {PhoneConstraintValidator.class})
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Phone {

    String code() default "1511";

    String message() default "Phone number format error";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
